<html>
<head><meta charset="utf-8"><title>When can an experimental version get into Nightly? · t-libs/wg-allocators · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/index.html">t-libs/wg-allocators</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html">When can an experimental version get into Nightly?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185159999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185159999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185159999">(Jan 08 2020 at 21:40)</a>:</h4>
<p>It came up at the gamedev-wg meeting that the alloc-wg seems (to an outside observer) to be reaching the point where you just have to have a lot of people actually try it out to get a wide range of feedback for much more progress to be made.</p>
<p>However, we're also aware that simply putting the draft version into <code>alloc</code> can't be done because that would affect Stable users too, which we don't want. At the same time, having the test version not be built into the compiler distribution means there's some parts it can't actually do on its own as an outside crate.</p>
<p>The idea that we had was maybe the whole thing could be put into a nightly-only <code>alloc_nightly</code> crate? Like as a 100% distinct crate that's just behind a feature flag and distributed in the Nightly distribution. That way the <code>alloc_nightly</code> can use the "standard library only" things.</p>
<p>Obviously the <code>alloc_nightly</code> version of the types wouldn't interact at all with the normal <code>alloc</code> crate's version of the types, so a lot of the ecosystem wouldn't interact well with this, but the kind of people this API needs to serve tend to be the sort who are willing to "build it from scratch" and experiment a bit, so that shouldn't be a big problem for the experimentation phase.</p>
<p>Thoughts?</p>



<a name="185169828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185169828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185169828">(Jan 08 2020 at 23:42)</a>:</h4>
<p>If it’s an entirely separate crate that needs to be opted into, what’s wrong with having it on <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a>?</p>



<a name="185169880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185169880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185169880">(Jan 08 2020 at 23:43)</a>:</h4>
<p>“Standard library only things” are unstable through the same <code>#![feature(…)]</code> mechanism as feature destined to be stabilized eventually</p>



<a name="185205851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185205851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185205851">(Jan 09 2020 at 12:12)</a>:</h4>
<p>What would be the difference between <code>alloc-nightly</code> and <code>alloc-wg</code>?</p>



<a name="185235704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185235704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185235704">(Jan 09 2020 at 17:35)</a>:</h4>
<p>If the whole point is just to try this out, a crate in <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a> seems like the right place.</p>



<a name="185235828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185235828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185235828">(Jan 09 2020 at 17:36)</a>:</h4>
<p>This means that if you try to pass an <code>alloc_wg::Vec</code> to an API expecting <code>alloc::Vec</code> your code will fail to compile</p>



<a name="185235874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185235874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185235874">(Jan 09 2020 at 17:37)</a>:</h4>
<p>Maybe <code>alloc_wg</code> could add some interfacing <code>From</code> impls, that allow converting between these types when possible ?</p>



<a name="185235885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185235885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185235885">(Jan 09 2020 at 17:37)</a>:</h4>
<p>Its still going to have some friction.</p>



<a name="185237901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185237901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185237901">(Jan 09 2020 at 17:58)</a>:</h4>
<p>I was told that there are some compiler features to try out that are restricted to only use within the standard library. If this is not the case then <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a> would be totally fine as a distribution method.</p>



<a name="185238786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185238786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185238786">(Jan 09 2020 at 18:06)</a>:</h4>
<p><code>#![feature(…)]</code> is how those restrictions are implemented</p>



<a name="185240875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185240875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185240875">(Jan 09 2020 at 18:29)</a>:</h4>
<p>I know about lang features. However, in another project when I tried to use the <code>since</code> attribute it errored on being standard library only and with no possible lang feature for using it outside of the standard library. It's just impossible. So such things so exist.</p>
<p>In this particular case, I have not been using alloc-wg myself, most of the testing was by another user in the gamedev-wg. Unfortunately this means that I don't know every detail. I was just the person who had the most time to communicate the message and follow up :P</p>
<p>So, if the initial assessment was wrong and the <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a> version of the crate really has all possible abilities then that's fine, no need for any changes.</p>



<a name="185241181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185241181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185241181">(Jan 09 2020 at 18:32)</a>:</h4>
<blockquote>
<p>when I tried to use the <code>since</code> attribute it errored on being standard library only</p>
</blockquote>
<p>That’s likely <code>#[feature(staged_api)]</code></p>



<a name="185301164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185301164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tim Diekmann <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185301164">(Jan 10 2020 at 11:16)</a>:</h4>
<blockquote>
<p>Maybe <code>alloc_wg</code> could add some interfacing <code>From</code> impls, that allow converting between these types when possible ?</p>
</blockquote>
<p>Feel free to make a Pull Request! :)</p>



<a name="185318763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185318763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185318763">(Jan 10 2020 at 15:17)</a>:</h4>
<p>I'm not sure is worth it, e.g., if you want to experiment with <code>alloc_wg</code>, then you are going to need nightly anyways, and you can work around certain things already.</p>



<a name="185318825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185318825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185318825">(Jan 10 2020 at 15:18)</a>:</h4>
<p>If there are particular examples causing friction, that's one of the things that we could do</p>



<a name="185319115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185319115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185319115">(Jan 10 2020 at 15:21)</a>:</h4>
<p>(e.g. for going from <code>alloc_wg::Vec</code> to <code>std::Vec</code> an <code>.into_raw_parts()</code> + <code>Vec::from_raw_parts</code> ought to work, but I can see how that's tiresome)</p>



<a name="185344796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185344796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185344796">(Jan 10 2020 at 19:51)</a>:</h4>
<p>A dedicated conversion API could ensure the allocators match</p>



<a name="185344853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185344853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Simon Sapin <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185344853">(Jan 10 2020 at 19:52)</a>:</h4>
<p><code>from_raw_parts</code> with a pointer from a different allocator is not good</p>



<a name="185390861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/197181-t-libs/wg-allocators/topic/When%20can%20an%20experimental%20version%20get%20into%20Nightly%3F/near/185390861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/197181-t-libs/wg-allocators/topic/When.20can.20an.20experimental.20version.20get.20into.20Nightly.3F.html#185390861">(Jan 11 2020 at 13:58)</a>:</h4>
<p>Sure, but users can write traits for those conversions themselves, and if they happen often, we could move them into <code>wg_alloc</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>